package com.quan.controller;

import com.quan.entity.OrderReq;
import com.quan.service.OrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: xiexinquan520@163.com
 * User: XieXinQuan
 * DATE:2020/8/3
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    OrderService orderService;

    @PostMapping("/create")
    public Object addOrder(@RequestBody OrderReq orderReq){
        orderService.createOrder(orderReq);
        return "创建订单成功！";
    }
}
